package com.elderly.service.impl;

import com.elderly.model.Elder;
import com.elderly.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description
 * @Date 2021/10/6 15:09
 * @Created 30500
 */
@Service
public class UserServiceImpl implements IUserService {
    /**
     * 用户数据库访问接口
     */

    @Override
    @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
    public Elder selectByPhone(String phone) {

        return new Elder();
    }

    @Override
    @Transactional(propagation = Propagation.REQUIRED)
    public int defaultUser(String phone) {
        // 填充默认用户的默认信息

        return 1;
    }
}
